package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BizBaseEntity;
import com.ruoyi.common.valid.VEdit;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 学员登录日志对象 t_student_login_log
 *
 * @author ruoyi
 * @since 2023-05-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_student_login_log")
public class StudentLoginLog extends BizBaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 学员姓名
     */
    @Excel(name = "学员姓名")
    private String studentName;

    /**
     * 学员id
     */
    @Excel(name = "学员id")
    private Long studentId;

    /**
     * 科目id
     */
    @Excel(name = "科目id")
    private Long courseId;

    /**
     * 访问时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

    /**
     * 查询-开始时间
     */
    @TableField(exist = false)
    private Date startDate;

    /**
     * 查询-结束时间
     */
    @TableField(exist = false)
    private Date endDate;

    @Override
    @NotNull(message = "唯一主键不能为空", groups = {VEdit.class})
    public Long getId() {
        return super.getId();
    }
}
